package com.forfunnet.minjian.rest;

/**
 * Created by RexQian on 4/3/16.
 */

public class MyRestHelper
{

    public static String ProductImageUrl(MyRestClient client, int id)
    {
        return ProductImageUrl(client, id, 0);
    }

    public static String ProductImageUrl(MyRestClient client, int id, int imageId)
    {
        return String.format("%s/products/%d/images/%d", client.getRootUrl(), id, imageId);
    }

    public static String ProductImageHeadUrl(MyRestClient client, int id)
    {
        return String.format("%s/products/%d/headImage", client.getRootUrl(), id);
    }

    public static String UserImageHeadUrl(MyRestClient client, int id)
    {
        return String.format("%s/users/%d/headImage", client.getRootUrl(), id);
    }
}
